#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    int x, y, n;
    cin >> x >> y >> n;
    if(x >= y) return 0;
    vector<int> a(n);
    for(int i = 0; i < n; ++i) {
        cin >> a[i];
    }
    sort(a.begin(), a.end(),greater<int>());
    int cnt = 0;
    while(x < y && !a.empty()) {
        x *= a[0];
        cnt++;
        if(x >= y) {
            cout << cnt;
            return 0;
        }
        auto maxElemIter = max_element(a.begin(), a.end());
        a.erase(remove_if(a.begin(), a.end(), [&](int x){return x == *maxElemIter;}));
    }
    cout << -1;
}